#include<stdio.h>
#include<stdlib.h>
#include<sys/types.h>
#include<unistd.h>
//模拟僵尸进程
int main()
{
 pid_t pid = fork();
 if(pid<0)
 {
     printf("进程创建失败!\n");
  exit(1);
 }
  if(pid ==0)
 {
printf("子进程的(pid：%d)isrunning.\n",getpid());
printf("子进程退出\n");
exit(0);
 }
 else 
 {
     printf("父进程 PID:%d,is sleep60 second\n",getpid());
     sleep(60);
     printf("父进程已完成！\n");
 }
    return 0;
}
